#include<stdio.h>

int AddToTop(int top)
{
    int sum = 0;
    int i = 1;
    for(; i <=top; i++) 
    {
        sum += i;
    }

    return sum;
}
int main()
{
    int top = 100;
    int result = 0;

    result = AddToTop(top);


    printf("result: %d\n", result);

    return 0;
}
